﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping.Attributes;

namespace TinyERP.ERP.Entity
{
    [NHibernate.Mapping.Attributes.Class(Table = "ProductCategory", NameType = typeof(ProductCategory), Lazy = false)]
    public class ProductCategory
    {
        [NHibernate.Mapping.Attributes.Id(0, TypeType = typeof(long), Column = "ID", Name = "ID")]
        [NHibernate.Mapping.Attributes.Generator(1, Class = "native")]
        public virtual long ID { get; set; }
       
        [NHibernate.Mapping.Attributes.Property(Column = "Name")]
        public virtual string Name { get; set; }
        
        [NHibernate.Mapping.Attributes.Property(Column = "Description")]
        public virtual string Description { get; set; }

        [NHibernate.Mapping.Attributes.ManyToOne(Column = "ParentID", Fetch = FetchMode.Join, ClassType = typeof(ProductCategory))]
        public virtual ProductCategory Parent { get; set; }
    }
}
